import java.util.Scanner;

public class age {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int age = 25;
        boolean confirm = false;
        while (!confirm) {
            System.out.println("您的年龄是：" + age);
            System.out.println("是否要更改年龄？(输入'更改'或'确认')");
            String choice = scanner.nextLine();
            if ("更改".equals(choice)) {
                System.out.println("请输入新的年龄：");
                age = scanner.nextInt();
            } else if ("确认".equals(choice)) {
                confirm = true;
                System.out.println("您的年龄已确认：" + age);
            } else {
                System.out.println("无效的输入，请重新输入！");
            }
        }
    }
}